#include "MySqlObjectImpl.h"
#include "../../../visitor/SQLASTVisitor.h"
#include "../visitor/MySqlASTVisitor.h"
#include "../../../../utils/instanceof.h"
#include "../../../../Exception/IllegalArgumentException.h"

void MySqlObjectImpl::accept0(SQLASTVisitor_ptr v)
{
  if (instanceof <SQLASTVisitor, MySqlASTVisitor>(v.get()))
  {
    MySqlASTVisitor_ptr tmp = std::dynamic_pointer_cast<MySqlASTVisitor>(v);
    accept0(tmp);
  }
  else
  {
    throw new IllegalArgumentException(make_string_ptr("not support visitor type : " + *v->getClass()));
  }
}
